package ar.edu.unicen.exa.oop.bbquery.aggregator.wrappers.java;

import java.net.URI;
import java.net.URISyntaxException;
import java.text.ParseException;

import ar.edu.unicen.exa.oop.bbquery.aggregator.Formatter;

public class URIFormatter implements Formatter<String, URI> {

	@Override
	public URI parse(String t) throws ParseException {
		try {
			return new URI(t);
		} catch (URISyntaxException e) {
			throw new ParseException("mmm ... ugly address", 0);
		}
	}

}
